#page_box_wide
  %h1.page_title
    = "#{link_to "Home", "/"} > #{link_to "Administrate", "/admins"} > Pages"
  .create_link
    = link_to "#{image_tag("icons/plus.gif", :alt => "")} New Page", :action => :new_page
  .menu
    = render :partial => "menu"
  %br{:style => "clear:both;"}
  %table
    %tr
      %th Name
      %th Created
      %th Updated
      %th Views
      %th
    - for page in @pages.reverse
      %tr
        %td
          = link_to page.name, page
        %td
          = "#{time_ago_in_words(page.created_at)} ago"
        %td
          = "#{time_ago_in_words(page.updated_at)} ago"
        %td
          = page.views
        %td{:align => "right"}
          = link_to image_tag("icons/edit.gif", :alt => "delete"), :action => :edit_page, :id => page.id
          = link_to image_tag("icons/trash.gif", :alt => "delete"), {:action => :destroy_page, :id => page.id}, :confirm => "Are you sure you want to delete this page?"
  %br
  = will_paginate @pages 